﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace 计科201518彭康
{
    public partial class 实验2_3 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (TextBox1.Text.Trim() == "")
            {
                Response.Write("<script>alert('请输入姓名!');</script>"); //如果TextBox1为空，就提示
                return;
            }
            this.Session["user"] = TextBox1.Text; //存储到服务器
            Response.Redirect("实验2-3-1.aspx"); //页面跳转
        }
    }
}